$OpenBSD: patch-drivers_dummy_dummy_driver_c,v 1.2 2012/01/24 08:03:52 ajacoutot Exp $
--- drivers/dummy/dummy_driver.c.orig	Thu Jun  9 01:54:49 2011
+++ drivers/dummy/dummy_driver.c	Mon Jan 23 14:21:11 2012
@@ -109,6 +109,7 @@ dummy_driver_wait (dummy_driver_t *driver, int extra_f
 {
 	jack_nframes_t nframes = driver->period_size;
 	struct timespec now;
+	struct timespec ts;
 
 	*status = 0;
 	/* this driver doesn't work so well if we report a delay */
@@ -134,7 +135,9 @@ dummy_driver_wait (dummy_driver_t *driver, int extra_f
 		}
 		driver->next_wakeup = add_ts(driver->next_wakeup, driver->wait_time);
 	} else {
-		if(clock_nanosleep(CLOCK_REALTIME, TIMER_ABSTIME, &driver->next_wakeup, NULL)) {
+		ts.tv_sec = 0;
+		ts.tv_nsec = ts_to_nsec(driver->next_wakeup) - ts_to_nsec(now);
+		if(nanosleep(&ts, NULL)) {
 			jack_error("error while sleeping");
 			*status = -1;
 		} else {
